/*
 * MIT License
 *
 * Copyright (c) 2024 tuxming@sina.com / wechat: angft1
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */


.x-modal-overlay{
    box-sizing: content-box;
    position: fixed;
    top: 0;
    left:0;
}

.x-modal-mask{
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
}

@keyframes zoomIn
{
    from {opacity: 0; transform: scale(0.2);}
    to {opacity: 1; transform: scale(1);}
}

@keyframes zoomOut
{
    from {opacity: 1; transform: scale(1);}
    to {opacity: 0; transform: scale(0.2);}
}

.x-modal-content{
    position:absolute;
    visibility: hidden;
    /* animation-name: zoomIn; */
    animation-fill-mode: forwards;
    animation-duration: 0.2s; /* 动画持续时间 */
    animation-iteration-count: 1; /* 循环播放 */
    animation-timing-function: ease-in-out; /* 缓动效果 */
    border-radius: 7px;
    background: white;
    box-sizing: border-box;
    box-shadow:
        0px 0px 5.3px rgba(0, 0, 0, 0.085),
        0px 0px 17.9px rgba(0, 0, 0, 0.125),
        0px 0px 80px rgba(0, 0, 0, 0.21);
}

.dark .x-modal-content{
    background-color: rgba(0, 0, 0, 0.9);
    box-shadow:
        0px 0px 5.3px rgba(255, 255, 255, 0.085),
        0px 0px 17.9px rgba(255, 255, 255, 0.125),
        0px 0px 80px rgba(255, 255, 255, 0.21)
    ;
}

.x-modal-inner-content{
    padding: 8px;
    max-height: 100vh;
    max-width: 100vw;
    overflow: auto;
    box-sizing: border-box;
}

.x-modal-body{
    box-sizing: border-box;
}

.x-modal-ctrl{
    position: absolute;
    top: 6px; 
    right: 6px;
    display:flex;
}

.x-modal-ctrl-btn svg{
    position:relative;
    top: -3px;
    fill: white;
}   

.x-modal-min-btn svg{
    top: -1px;
}   

.x-modal-ctrl-btn{
    position:relative;
    border-radius: 30px;
    padding: 0px 6.5px;
    cursor: pointer;
    margin-left: 3px;
    margin-right: 3px;
}

.x-modal-min-btn span{
    position:relative;
    top: -4px;
    background-color: white;
    display:inline-block;
    width: 7px; 
    height: 3px;
}   
.x-modal-min-btn:hover span{
    background-color: rgba(80,80,80);;
}

.x-modal-max-btn, .x-modal-min-btn{
    background-color: rgba(225,225,225);
}

.x-modal-max-btn:hover, .x-modal-min-btn:hover{
    background-color: rgba(170,170,170);
}

.x-modal-max-btn:hover path{
    fill: rgba(80,80,80);
}

.x-modal-close-btn{
    background-color: #e81123;
}

.x-modal-close-btn:hover{
    background-color: #f3404f;
}

.x-modal-move-btn{
    display:none;
    padding: 0px;
    background: none;
    top: 3px;
}

.x-modal-title{
    color: #333;
    font-size: 14px;
    position:relative;
    top: -1px;
    padding-right: 6px;
    word-break: keep-all;
    overflow:hidden;
    white-space: nowrap;
}

.dark .x-modal-min-btn, .dark .x-modal-max-btn{
    background-color: transparent;
    border: 1px solid #aaa;
}

.dark .x-modal-min-btn span, .dark .x-modal-max-btn path{
    background-color: #aaa;
    fill: #aaa;
}


.dark .x-modal-min-btn:hover, .dark .x-modal-max-btn:hover{
    border: 1px solid #fff;
}

.dark .x-modal-min-btn:hover span, .dark .x-modal-max-btn:hover path{
    background-color: #fff;
    fill: #fff;
}


.dark .x-modal-close-btn{
    padding: 1px 8px;
}

.dark .x-modal-close-btn svg{
    top: -3px;
    left: 0.5px;
}

.dark .x-modal-move-btn{
    top: 5px;
}

.x-modal-content:hover .x-modal-resize-btn, .x-modal-content:hover .x-modal-move-btn{
    display: block; 
}

.x-modal-resize-btn{
    display:none;
    position: absolute;
    right: -10px; 
    bottom: -10px;
    cursor: nw-resize;
}
